﻿using BCCommon.TMS.FreightEnums;
using BCCommon.TMS.Order;
using BCEntity.CRM.BigCustomerFreightConfigExtention;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.CRM.BigCustomerFreightConfigExtention
{
    public interface IBigCustomerFreightConfigExtentionData
    {
        /// <summary>
        /// 删除大客户运费配置扩展记录
        /// </summary>
        /// <param name="bigCustomerFreightConfigExtentionId"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(long bigCustomerFreightConfigExtentionId);

        /// <summary>
        /// 获取大客户运费配置扩展记录
        /// </summary>
        /// <param name="bigCustomerFreightConfigExtentionId"></param>
        /// <returns></returns>
        Task<BigCustomerFreightConfigExtentionEntity> GetEntityAsync(long bigCustomerFreightConfigExtentionId);

        Task<BigCustomerFreightConfigExtentionEntity> GetEntityAsync(long freightConfigExtentionId, long bigCustomerId);

        /// <summary>
        /// 获取大客户运费配置列表 分页
        /// </summary>
        /// <param name="companyId">公司Id</param> 
        /// <param name="agentRecordId">代理商记录Id</param>
        /// <param name="bigCustomerId"></param>
        /// <param name="vehicleTypeId">车型Id</param>
        /// <param name="vehicleCategoryReferenceId">车辆分类映射Id</param>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="cityCode">城市编码</param>
        /// <param name="countyCode">区县编码</param>
        /// <param name="sourceType">订单来源</param>
        /// <param name="freightType">物流类型</param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns> 
        Task<(IEnumerable<BigCustomerFreightConfigExtentionViewEntity>, int)> GetListAsync(int? companyId, long? agentRecordId, long? bigCustomerId, int? vehicleTypeId, int? vehicleCategoryReferenceId, string provinceCode, string cityCode, string countyCode, OrderSourceType? sourceType, FreightType? freightType, int pageIndex, int pageSize);

        /// <summary>
        /// 添加新大客户运费配置扩展纪录
        /// </summary>
        /// <param name="bigCustomerFreightConfigExtentionEntity"></param>
        /// <returns></returns>
        Task<BigCustomerFreightConfigExtentionEntity> InsertAsync(BigCustomerFreightConfigExtentionEntity entity);

        /// <summary>
        /// 修改大客户运费配置扩展记录
        /// </summary>
        /// <param name="bigCustomerFreightConfigExtentionEntity"></param>
        /// <returns></returns>
        Task<BigCustomerFreightConfigExtentionEntity> UpdateAsync(BigCustomerFreightConfigExtentionEntity entity);
    }
}